import { RouteRecordRaw } from "vue-router";

export const Layout = () => import("@/layout/index.vue");

export const settingRoutes: RouteRecordRaw[] = [
  {
    path: "/",
    component: Layout,
    name: "Redirect",
    redirect: "/home",
    meta: { hidden: true },
    children: [
      {
        path: "/redirect/:path(.*)",
        component: () => import("@/components/Redirect/index.vue"),
      },
    ],
  },
  {
    path: "/",
    component: Layout,
    redirect: "/",
    name: "HomePage",
    meta: {
      title: "首页",
      isLink: "https://wwiv6y5ceds.feishu.cn/wiki/WYHPwCwUTieyKWkkxmmcpAJxnIe",
      isIframe: true,
      noCache: true,
    },
    children: [
      {
        path: "home",
        name: "Home",
        component: () => import("@/views/home/index.vue"),
        meta: { title: "首页", affix: true, hidden: true },
      },
    ],
  },
  {
    path: "/password",
    name: "Password",
    component: Layout,
    redirect: "/password/index",
    children: [
      {
        path: "index",
        name: "passwordIndex",
        component: () => import("@/views/password/index.vue"),
        meta: { title: "修改密码", icon: "ele-Edit", hidden: true },
      },
    ],
  },

  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
  },

  {
    path: "/:pathMatch(.*)*",
    name: "NotFound",
    component: () => import("@/components/404/index.vue"),
  },
];
